<div class="form">
<?php $form=$this->beginWidget('bootstrap.widgets.TbActiveForm',array(
	'id'=>'sys-user-form',
	'enableAjaxValidation'=>true,
        'method'=>'post',
	'type'=>'horizontal',
	'htmlOptions'=>array(
		'enctype'=>'multipart/form-data'
	)
)); ?>
     	<fieldset>
		<legend>
			<p class="note">Fields with <span class="required">*</span> are required.</p>
		</legend>

	<?php echo $form->errorSummary($model,'Opps!!!', null,array('class'=>'alert alert-error span12')); ?>
        		
   <div class="control-group">		
			<div class="span6">

	<div class="control-group ">
                <label for="namakar" class="control-label required">
                        Karyawan<span class="required">*</span>
                </label>
                <div class="controls">
                        <?php 
                                echo $form->hiddenField($model,'id_kary'); 
                                echo CHtml::textField('namakar', Karyawan::model()->findByPk($model->id_kary)->nama, array('class'=>'span5','readonly'=>true));
                        ?>
                </div>
        </div>

	<?php echo $form->textFieldRow($model,'username',array('class'=>'span5','maxlength'=>50)); ?>
        <label for="namakar" class="control-label required">
                Password<span class="required">*</span>
        </label>
        <div class="controls">
            <?php echo CHtml::passwordField('SysUser[password]','',array('class'=>'span5','maxlength'=>50)); ?>
        </div>

                        </div>   
  </div>

	<div class="form-actions">
		<?php $this->widget('bootstrap.widgets.TbButton', array(
			'buttonType'=>'submit',
			'type'=>'primary',
                        'icon'=>'ok white',  
			'label'=>$model->isNewRecord ? 'Create' : 'Save',
		)); ?>
              <?php $this->widget('bootstrap.widgets.TbButton', array(
			'buttonType'=>'reset',
                        'icon'=>'remove',  
			'label'=>'Reset',
		)); ?>
	</div>
</fieldset>

<?php $this->endWidget(); ?>

</div>
<?php $this->beginWidget('bootstrap.widgets.TbModal', array(
			'id'=>'winKary',
			'htmlOptions'=>array('style'=>'width:800px'),
)); ?>
<?php $this->endWidget(); ?>
<script src="<?php echo Yii::app()->baseUrl; ?>/addon/js_modul/sysuser/sysuser.js"></script>
